package com.company;
import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        Bank bank = new Bank();
        Scanner scanner = new Scanner(System.in);
        while (true){
            System.out.println();
            System.out.println("请输入选择：1.安全性检测  2.银行家算法  3.打印进程状态  4.退出");
            int select = scanner.nextInt();
            if(select == 1) {
                bank.securityExamine();
            } else if(select == 2) {
                bank.request();
            } else if(select == 3) {
                bank.printState();
            } else if(select == 4){
                break;
            }else {
                try {
                    throw new IllegalAccessException("输入异常");
                } catch (IllegalAccessException e) {
                    e.printStackTrace();
                }
            }
        }

	// write your code here
    }
}
